<template>
	<view>
		<image src="@/static/order_detbg.png" class="top_img"></image>
		<view v-if="isloding" style="text-align: center;margin-top: 50rpx;">
			<u-loading mode="circle"></u-loading>
		</view>
		<view v-if="!isloding">
			<view class="body">
				<view class="top_title">订单已支付</view>
				<view class="info_bg">
					<view style="display: flex;align-items: center;justify-content: space-between;">
						<view class="left_title">订单状态：</view>
						<view class="right_title">已支付</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">套餐名称：</view>
						<view class="right_title">{{info.order_name}}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">订单编号：</view>
						<view class="right_title">{{info.order_no}}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">下单时间：</view>
						<view class="right_title">{{info.create_at}}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">客户昵称：</view>
						<view class="right_title">{{info.nickname}}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">客户电话</view>
						<view class="right_title">{{info.phone}}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 64rpx;">
						<view class="left_title">已支付：</view>
						<view class="right_title" style="color: #FE592D;"><text
								style="font-size: 24rpx;">¥</text>{{info.pay_money}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="meun-cell flex align-center" style="flex-direction: column;margin-top: 50rpx;" @click="handCall">
			<view class="icon">
				<image src="/static/user/phone.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
			</view>
			<view class="name">客服电话</view>
		</view>
		<!-- 	<view class="bottom_bg" v-if="info.status == 0">
			<view class="pay_btn" @click="to_pay">立即支付</view>
		</view> -->
		<!-- <u-popup v-model="pay_show" mode='bottom' border-radius="28">
			<view class="pop_bg">
				<view class="pop_title"><text style="font-size: 32rpx;">¥</text>69.90</view>
				<view class="pop_tag">向杭州网约车助手的商户支付</view>
				<view class="line"></view>
				<view style="display: flex;align-items: center;margin-top: 56rpx;margin-left: 24rpx;">
					<view>
						<u-icon name="zhifubao-circle-fill" color="#3575EF" size="46"></u-icon>
					</view>
					<view class="pay_type_title">支付宝</view>
				</view>
			</view>
		</u-popup> -->
	</view>
</template>

<script>
	import {
		order_det
	} from '@/api/home.js'
	import {
		hotLine
	} from "@/api/user.js"
	export default {
		data() {
			return {
				info: {
					status: 0,
				},
				pay_show: false,
				id: 0,
				isloding: true,
				cellphone: ''
			};
		},
		onLoad(e) {
			this.id = e.id
			this.getdet()
			this.getcellphone()
			// this.info = JSON.parse(decodeURIComponent(e.info))
		},
		methods: {
			//去支付
			to_pay() {

			},
			handCall() {
				uni.makePhoneCall({
					phoneNumber: this.cellphone
				})
			},
			async getdet() {
				const {
					data,
					msg,
					code
				} = await order_det({
					order_id: this.id
				})
				this.isloding = false
				this.info = data
			},
			//客服电话
			async getcellphone() {
				const {
					data
				} = await hotLine()
				this.cellphone = data
			},
		}
	}
</script>

<style lang="scss" scoped>
	.top_img {
		width: 750rpx;
		height: 360rpx;
	}

	.body {
		position: relative;
		margin-top: -320rpx;

		.top_title {
			font-size: 40rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #FFFFFF;
			margin-left: 38rpx;
		}

		.info_bg {
			width: 702rpx;
			padding: 64rpx 24rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin: 0 auto;
			margin-top: 28rpx;

			.left_title {
				font-size: 30rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;
			}

			.right_title {
				font-size: 30rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
			}
		}
	}

	.bottom_bg {
		position: fixed;
		justify-content: center;
		bottom: 0rpx;
		width: 750rpx;
		height: 190rpx;
		background: #FFFFFF;

		.pay_btn {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 702rpx;
			height: 92rpx;
			background: #36c269;
			border-radius: 50rpx;
			font-size: 32rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #FFFFFF;
			margin: 0 auto;
			margin-top: 16rpx;
		}
	}

	.pop_bg {
		width: 750rpx;
		height: 938rpx;
		background: #FFFFFF;

		.pop_title {
			font-size: 64rpx;
			font-family: PingFang SC-Heavy, PingFang SC;
			font-weight: 800;
			color: #333333;
			text-align: center;
			margin-top: 48rpx;
		}

		.pop_tag {
			font-size: 28rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			text-align: center;
			margin-top: 12rpx;
		}

		.line {
			width: 702rpx;
			height: 1rpx;
			background-color: #DDDDDD;
			margin: 0 auto;
			margin-top: 38rpx;
		}

		.pay_type_title {
			font-size: 30rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			margin-left: 16rpx;
		}
	}

	.meun {

		&-cell {
			padding: 20rpx 34rpx;

			.icon {
				image {
					width: 50rpx;
					height: 50rpx;
				}
			}

			.name {
				margin-left: 22rpx;
				font-size: 31rpx;
				flex: 1;
			}
		}
	}
</style>